package br.com.quiz.domain;

import java.io.Serializable;

import javax.persistence.*;

import org.hibernate.annotations.Cascade;

/**
 * The persistent class for the alternativas_questao database table.
 * 
 */
@Entity
@Table( name = "alternativas_questao" )
@NamedQueries( value = { @NamedQuery( name = "AlternativasQuestao.listar", query = "SELECT a FROM AlternativasQuestao a" ), 
		@NamedQuery( name = "AlternativasQuestao.filtrarPorQuestao", 
		query = "SELECT a.alternativa FROM AlternativasQuestao a where a.questao = :questao" ) } )

public class AlternativasQuestao implements Serializable{
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue( strategy = GenerationType.IDENTITY )
	@Column( name = "ALQ_ID" )
	private int alqId;

	//bi-directional many-to-one association to Alternativa
	@ManyToOne
	@JoinColumn( name = "ALQ_ALT_ID" )
	private Alternativa alternativa;

	//bi-directional many-to-one association to Questao
	@ManyToOne
	@JoinColumn( name = "ALQ_QUE_ID" )
	private Questao questao;

	public AlternativasQuestao(){}

	public int getAlqId() {
		return this.alqId;
	}

	public void setAlqId( int alqId ) {
		this.alqId = alqId;
	}

	public Alternativa getAlternativa() {
		return this.alternativa;
	}

	public void setAlternativa( Alternativa alternativa ) {
		this.alternativa = alternativa;
	}

	public Questao getQuestao() {
		return this.questao;
	}

	public void setQuestao( Questao questao ) {
		this.questao = questao;
	}

}